package com.fire.security.controller;

import com.fire.security.domain.Result;
import com.fire.security.service.StatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/statistics")
public class StatisticsController {
    @Autowired
    StatisticsService statisticsService;

    @GetMapping("/getArticlesRank")
    public Result getArticlesRank(){
        return statisticsService.getArticlesRank();
    }

    @GetMapping("/getUserCount")
    public Result getUserCount(){
        return statisticsService.getUserCount();
    }

    @GetMapping("/get7DaysReportCount")
    public Result get7DaysReportCount(){
        return statisticsService.get7DaysReportCount();
    }

    @GetMapping("/getAllShopLocal")
    public Result getAllShopLocal(){
        return statisticsService.getAllShopLocal();
    }
}
